#pragma once

#ifndef _ContentManager_h_
#define _ContentManager_h_

#include "D3DXMesh.h"
#include "Game.h"
#include "Sound.h"

#include <map>

namespace Framework {

class ContentManager {
public:
    ContentManager(Game* game);
    virtual ~ContentManager(void);
    IDirect3DCubeTexture9* LoadCubeTexture(LPCSTR filename);
    ID3DXEffect* LoadEffect(LPCSTR filename);
    D3DXMesh* LoadMesh(LPCSTR filename);
    Sound* LoadSound(LPCSTR filename);
    IDirect3DTexture9* LoadTexture(LPCSTR filename);
    IDirect3DVolumeTexture9* LoadVolumeTexture(LPCSTR filename);
    IDirectSoundBuffer* LoadWaveFile(LPCSTR filename);
private:
    Game* game;
    map<LPCSTR, ID3DXEffect*> effects;
    map<LPCSTR, D3DXMesh*> meshes;
    map<LPCSTR, IDirectSoundBuffer*> primarySoundBuffers;
    map<LPCSTR, IDirect3DBaseTexture9*> textures;
};

#endif

}